{
    let EVENT_CLICK = Laya.Event.CLICK;

    class RoomList extends ui.Match.RoomListUI {
        constructor (callback) {
            super();

            this.callback = callback;
            this.actions = null;

            this.init();
        }

        init () {
            this.anchorX = 0.5;
            this.centerX = 0;
            this.initEvent();
        }

        initEvent () {
            this.btnEnter.on(EVENT_CLICK, this, function () {
                Sail.director.popScene(new Alert.EnterRoom);
            });
            
            this.btnCreate.on(EVENT_CLICK, this, function () {
                this.callback && this.callback("create");
            });
        }

        resize (width, height, rate){
            this.scale(rate, rate);
            this.bottom = 30 * rate;
        }
    }

    Sail.class(RoomList, "Com.Match.RoomList");
}